Skip to content

Conversation

@adduarte
Copy link

@adduarte adduarte commented May 5, 2021

The bugzilla in question is rooted on attempting to create
ports with the same name.

This patch uses the subnet and netids as name suffixes for ports.

Also limits the length of the port name to no more than 255 characters, which is in line with what the current neutron db schema can tolerate.

https://issues.redhat.com/browse/OCPBUGSM-28624

@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 5, 2021
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please ask for approval from adduarte after the PR has been reviewed.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Member

@mandre mandre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable.

@adduarte
Copy link
Author

adduarte commented May 6, 2021

/test e2e-openstack

@adduarte
Copy link
Author

adduarte commented May 6, 2021

/test e2e-openstack-ipi

@openshift-ci
Copy link

openshift-ci bot commented May 6, 2021

@adduarte: The specified target(s) for /test were not found.
The following commands are available to trigger jobs:

  • /test e2e-openstack
  • /test e2e-upgrade
  • /test gofmt
  • /test golint
  • /test govet
  • /test images
  • /test unit

Use /test all to run the following jobs:

  • pull-ci-openshift-cluster-api-provider-openstack-master-e2e-openstack
  • pull-ci-openshift-cluster-api-provider-openstack-master-gofmt
  • pull-ci-openshift-cluster-api-provider-openstack-master-golint
  • pull-ci-openshift-cluster-api-provider-openstack-master-govet
  • pull-ci-openshift-cluster-api-provider-openstack-master-images
  • pull-ci-openshift-cluster-api-provider-openstack-master-unit
Details

In response to this:

/test e2e-openstack-ipi

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@adduarte
Copy link
Author

adduarte commented May 6, 2021

/test e2e-openstack

@adduarte
Copy link
Author

adduarte commented May 6, 2021

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 6, 2021
@adduarte adduarte force-pushed the BZ_1955969 branch 3 times, most recently from 05fd220 to 200009b Compare May 7, 2021 00:19
@adduarte
Copy link
Author

adduarte commented May 7, 2021

/hold cancel

@adduarte adduarte changed the title [WIP] Bugzilla 1955969 - Makes port names unique. Bugzilla 1955969 - Makes port names unique. May 7, 2021
@openshift-ci openshift-ci bot removed do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels May 7, 2021
@adduarte adduarte changed the title Bugzilla 1955969 - Makes port names unique. Bug 1955969 - Makes port names unique. May 7, 2021
@adduarte
Copy link
Author

adduarte commented May 7, 2021

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 7, 2021
@adduarte
Copy link
Author

adduarte commented May 7, 2021

/test e2e-openstack

@adduarte
Copy link
Author

adduarte commented May 7, 2021

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 7, 2021
@adduarte adduarte requested a review from mandre May 7, 2021 03:54
@openshift-ci
Copy link

openshift-ci bot commented May 7, 2021

@adduarte: No Bugzilla bug is referenced in the title of this pull request.
To reference a bug, add 'Bug XXX:' to the title of this pull request and request another bug refresh with /bugzilla refresh.

Details

In response to this:

/bugzilla refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@adduarte adduarte changed the title Bug 1955969 - Makes port names unique. Bug 1955969: - Makes port names unique. May 7, 2021
@openshift-ci
Copy link

openshift-ci bot commented May 7, 2021

@adduarte: This pull request references Bugzilla bug 1955969, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.8.0) matches configured target release for branch (4.8.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

No GitHub users were found matching the public email listed for the QA contact in Bugzilla (juriarte@redhat.com), skipping review request.

Details

In response to this:

Bug 1955969: - Makes port names unique.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci openshift-ci bot added bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels May 7, 2021
@adduarte
Copy link
Author

adduarte commented May 7, 2021

This is ready to merge once we get a green on ci/prow/e2e-openstack

@openshift-ci
Copy link

openshift-ci bot commented May 7, 2021

@adduarte: This pull request references Bugzilla bug 1955969, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.8.0) matches configured target release for branch (4.8.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

No GitHub users were found matching the public email listed for the QA contact in Bugzilla (juriarte@redhat.com), skipping review request.

Details

In response to this:

Bug 1955969: - Makes port names unique.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@pierreprinetti
Copy link
Member

pierreprinetti commented May 7, 2021

Do you plan on changing port names in Terraform as well?

Also this requires a review by the Kuryr folk:
/cc @MaysaMacedo

@openshift-ci
Copy link

openshift-ci bot commented May 7, 2021

@pierreprinetti: GitHub didn't allow me to request PR reviews from the following users: maysamacedo.

Note that only openshift members and repo collaborators can review this PR, and authors cannot review their own PRs.

Details

In response to this:

don’t forget to change the name in Terraform as well for consistency.

Also this requires a review by the Kuryr folk:
/cc @MaysaMacedo

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

portName = name
}
if len(portName) > PortNameMaxSize {
portName = portName[len(portName)-PortNameMaxSize:]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic for shortening the the port name in case it's too long takes the last 255 chars, I would have personally kept the first chars since the name is supposed to be for humans. Not that it matters, I expect we never end up in a situation where the port name is that long anyway...

@mandre
Copy link
Member

mandre commented May 7, 2021

@adduarte I hope you don't mind, I changed the commit message. Your commit still had the WIP tag in its subject.

@EmilienM
Copy link
Member

EmilienM commented May 7, 2021

/hold
until someone explains correctly why we don't comment the code here.
I requested that we comment the 255 number to explain why we made that decision.
Having it in the commit message is not enough. It is good practice to comment directly in the code.

Thank you.

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 7, 2021
The bugzilla in question is rooted on attempting to create
ports with the same name.

This patch uses the subnet and netids as name suffixes for ports.

Also limits the length of the port name to no more than 255 characters,
which is in line with what the current neutron db schema can tolerate.
@mandre
Copy link
Member

mandre commented May 7, 2021

/hold
until someone explains correctly why we don't comment the code here.
I requested that we comment the 255 number to explain why we made that decision.
Having it in the commit message is not enough. It is good practice to comment directly in the code.

You're entirely correct, I've made the requested change.
/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 7, 2021
@dulek
Copy link

dulek commented May 7, 2021

Please note that backporting this to 4.7 will break CNO's ability to deploy an API LB through Octavia, effectively breaking installation with Kuryr. It'd require some more effort to make it work.

@mandre
Copy link
Member

mandre commented May 7, 2021

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 7, 2021
@openshift-ci
Copy link

openshift-ci bot commented May 7, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mandre

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 7, 2021
@openshift-merge-robot openshift-merge-robot merged commit 03612d3 into openshift:master May 7, 2021
@openshift-ci
Copy link

openshift-ci bot commented May 7, 2021

@adduarte: All pull requests linked via external trackers have merged:

Bugzilla bug 1955969 has been moved to the MODIFIED state.

Details

In response to this:

Bug 1955969: - Makes port names unique.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@pierreprinetti pierreprinetti deleted the BZ_1955969 branch May 7, 2021 14:48
pierreprinetti pushed a commit to shiftstack/cluster-api-provider-openstack that referenced this pull request Apr 22, 2024
* Make yaml lint happy

* Add filter key for networks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants